<?php

namespace app\common\model;

use think\Model;
use traits\model\SoftDelete;
/**
 * 抓取郵件地址
 */
class CrawlEmails extends Model
{
    // 表名
    protected $name = 'crawl_emails';
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    // 追加属性
    protected $append = [
        'key'
    ];
    public function getKeyAttr($v,$data){
        return time().rand(10000000,9999999)."-".$data['id'];
    }
   
}
